From: Ævar Arnfjörð Bjarmason Date: Tue, 9 Aug 2005 12:25:07 +0000 (+0000) Subject: * Giving interwiki links a class so that they can be styled individually X-Git-Tag: 1.6.0~2041 X-Git-Url: http://git.cyclocoop.org/%28%5B%5E/404?a=commitdiff_plain;h=28ecda1e36eafb8f76e11e1ce4a968f833ca0b81;p=lhc%2Fweb%2Fwiklou.git * Giving interwiki links a class so that they can be styled individually --- diff --git a/includes/SkinTemplate.php b/includes/SkinTemplate.php index fcdd3daf02..daf9f5b686 100644 --- a/includes/SkinTemplate.php +++ b/includes/SkinTemplate.php @@ -362,10 +362,15 @@ class SkinTemplate extends Skin { if ( !$wgHideInterlanguageLinks ) { foreach( $wgOut->getLanguageLinks() as $l ) { + $tmp = explode( ':', $l, 2 ); + $class = 'interwiki-' . $tmp[0]; + unset($tmp); $nt = Title::newFromText( $l ); - $language_urls[] = array('href' => $nt->getFullURL(), - 'text' => ($wgContLang->getLanguageName( $nt->getInterwiki()) != ''?$wgContLang->getLanguageName( $nt->getInterwiki()) : $l), - 'class' => $wgContLang->isRTL() ? 'rtl' : 'ltr'); + $language_urls[] = array( + 'href' => $nt->getFullURL(), + 'text' => ($wgContLang->getLanguageName( $nt->getInterwiki()) != ''?$wgContLang->getLanguageName( $nt->getInterwiki()) : $l), + 'class' => $class + ); } } if(count($language_urls)) { diff --git a/skins/MonoBook.php b/skins/MonoBook.php index ca28f92c8d..2556c4b0b1 100644 --- a/skins/MonoBook.php +++ b/skins/MonoBook.php @@ -189,7 +189,7 @@ class MonoBookTemplate extends QuickTemplate {